package com.booza.util;

import java.util.ArrayList;
import java.util.List;

/**
 * Properties configurable via booza.properties file.
 */
public class PropertiesReader
{
	private int defaultEntriesPerPage;
	private int entriesPerPageFullList;
	private int entriesPerRanking;
	private int entriesPerFinancial;
	private int entriesPerFriends;
	private int entriesPerRankingSummary;
	private String uploadPath;
	private List<String> itemsPerPage = new ArrayList<String>();
	private String massPayTimeLine;	
	private String hostUrl;
	private String hostPort;
	private String hostContext;
	private int maxLoginFailureAttempts;
	
	public String getUploadPath()
	{
		return uploadPath;
	}

	public void setUploadPath(String uploadPath)
	{
		this.uploadPath = uploadPath;
	}
	
	public int getDefaultEntriesPerPage()
	{
		return defaultEntriesPerPage;
	}

	public void setDefaultEntriesPerPage(int maxEntries)
	{
		this.defaultEntriesPerPage = maxEntries;
	}

	public int getEntriesPerPageFullList()
	{
		return entriesPerPageFullList;
	}

	public void setEntriesPerPageFullList(int defaultEntriesPerPageFullList)
	{
		this.entriesPerPageFullList = defaultEntriesPerPageFullList;
	}

	public int getEntriesPerRanking()
	{
		return entriesPerRanking;
	}

	public void setEntriesPerRanking(int defaultEntriesPerRanking)
	{
		this.entriesPerRanking = defaultEntriesPerRanking;
	}

	/**
	 * @return the entriesPerFinancial
	 */
	public int getEntriesPerFinancial()
	{
		return entriesPerFinancial;
	}

	/**
	 * @param entriesPerFinancial
	 *          the entriesPerFinancial to set
	 */
	public void setEntriesPerFinancial(int entriesPerFinancial)
	{
		this.entriesPerFinancial = entriesPerFinancial;
	}

	/**
	 * @return the entriesPerFriends
	 */
	public int getEntriesPerFriends()
	{
		return entriesPerFriends;
	}

	/**
	 * @param entriesPerFriends
	 *          the entriesPerFriends to set
	 */
	public void setEntriesPerFriends(int entriesPerFriends)
	{
		this.entriesPerFriends = entriesPerFriends;
	}

	/**
	 * @return the entriesPerRankingSummary
	 */
	public int getEntriesPerRankingSummary()
	{
		return entriesPerRankingSummary;
	}

	/**
	 * @param entriesPerRankingSummary
	 *          the entriesPerRankingSummary to set
	 */
	public void setEntriesPerRankingSummary(int entriesPerRankingSummary)
	{
		this.entriesPerRankingSummary = entriesPerRankingSummary;
	}

	/**
	 * @return the itemsPerPage
	 */
	public List<String> getItemsPerPage()
	{
		return itemsPerPage;
	}

	/**
	 * @param itemsPerPage
	 *          the itemsPerPage to set
	 */
	public void setItemsPerPageOptions(String options)
	{
		String[] values = options.split(",");
		for (String str : values) {
			itemsPerPage.add(str);
		}
	}

	/**
	 * @return the massPayTimeLine
	 */
	public String getMassPayTimeLine()
	{
		return massPayTimeLine;
	}

	/**
	 * @param massPayTimeLine
	 *          the massPayTimeLine to set
	 */
	public void setMassPayTimeLine(String massPayTimeLine)
	{
		this.massPayTimeLine = massPayTimeLine;
	}

	public String getHostUrl()
	{
		return hostUrl;
	}

	public void setHostUrl(String hostUrl)
	{
		this.hostUrl = hostUrl;
	}

	public String getHostPort()
	{
		return hostPort;
	}

	public void setHostPort(String hostPort)
	{
		this.hostPort = hostPort;
	}

	public String getHostContext()
	{
		return hostContext;
	}

	public void setHostContext(String hostContext)
	{
		this.hostContext = hostContext;
	}

	public int getMaxLoginFailureAttempts()
	{
		return maxLoginFailureAttempts;
	}

	public void setMaxLoginFailureAttempts(int maxLoginFailureAttempts)
	{
		this.maxLoginFailureAttempts = maxLoginFailureAttempts;
	}
}
